﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyProj.MVCProj3.BLL;
using MyProj.MVCProj3.DAL;

namespace MyProj.MVCProj3.UI.Main.Controllers
{
    public class LoginController : Controller
    {
        //
        // GET: /Login/
        UserInfoService bll = new UserInfoService();

        public ActionResult Login()
        {
            return View();
        }

        public ActionResult ProcessLogin()
        {
            return Content("true");
        }

        public ActionResult GetValidateCode()
        {
            var vCode = new MyProj.MVCProj3.Common.ValidateCode();
            string ValidateCode = vCode.CreateValidateCode(4);
            Session["ValidateCode"] = ValidateCode;
            byte[] bytes=vCode.CreateValidateGraphic(vCode.CreateValidateCode(4));
            return File(bytes, @"image/jpeg");
        }
    }
}
